<?php
class MessageTool{
	/*
	 *@param $msg 提示信息
	 *@param $url 跳转页面地址 index.php?m=控制器名&r=方法名
	*/
	function prompt($msg,$url=''){
		echo "<META http-equiv=Content-Type content=\"text/html; charset=utf-8\">";
		echo  '<script>';
		echo  "alert('$msg');";
		if(!empty($url)){
			echo "window.location.href='$url';";
			echo '</script>';
			exit;
		}
		echo '</script>';
		exit;
	}

	function  redirect($url){
		echo "<META http-equiv=Content-Type content=\"text/html; charset=utf-8\">";
		echo  '<script>';
	    echo "window.location.href='$url';";
		echo '</script>';
		exit;
		
	}

	
}
?>